package com.example.userconsumer.service;

import cn.example.entity.User;
import com.example.userconsumer.execepiton.UserServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name="user-provider",fallback = UserServiceFallBack.class)
public interface  UserService {


    //这些接口都来源于provider
    @RequestMapping(value = "/login",method = RequestMethod.POST)
    public abstract boolean login(@RequestParam String username, @RequestParam String password);

    @RequestMapping(value = "/login2",method = RequestMethod.POST)
    public abstract boolean login2(@RequestBody User user);

    @RequestMapping(value = "/login3", method = RequestMethod.POST)
    public boolean login3(@RequestParam Integer count);


}
